<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ Copyright 2020 huanggefan.cn
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->

<!DOCTYPE html>

<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content=webkit>
    <meta lang="zh">
    <link rel='stylesheet' type='text/css' href='/css/assets.css'>
    <script type='text/javascript' src='/js/assets.js'></script>
    <title>智慧课堂 - 管理员</title>
</head>
<body class="flex flex-col justify-start align-start">
<div style="display: none" id="manager-question-page"></div>

<nav class="width-full margin-b2">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a class="text-primary" href="#" id="question-choose">选择课程</a></li>
        <li class="breadcrumb-item"><a class="text-secondary" href="#" id="question-createB">创建题库</a></li>
        <li class="breadcrumb-item"><a class="text-secondary" href="#" id="question-updateB">更新题库</a></li>
        <li class="breadcrumb-item"><a class="text-secondary" href="#" id="question-setB">设置题库管理员</a></li>
        <li class="breadcrumb-item"><a class="text-secondary" href="#" id="question-unsetB">移除题库管理员</a></li>
        <li class="breadcrumb-item"><a class="text-secondary" href="#" id="question-deleteB">删除题库</a></li>
        <li class="breadcrumb-item"><a class="text-secondary" href="#" id="question-chooseB">选择题库</a></li>
        <li class="breadcrumb-item"><a class="text-secondary" href="#" id="question-editQ">题目编辑</a></li>
    </ol>
</nav>

<form id="choose" style="display: flex" class="flex-col justify-start align-start flex-grow width-full-6 margin-l3 margin-r3">
    <div class="width-full form-group margin-b3">
        <label for="choose-college">选择学院</label>
        <select class="form-control text-primary" id="choose-college"></select>
    </div>
    <div class="width-full form-group margin-b3">
        <label for="choose-major">选择专业</label>
        <select class="form-control text-primary" id="choose-major"></select>
    </div>
    <div class="width-full form-group margin-b3">
        <label for="choose-course">课程名称</label>
        <select class="form-control text-primary" id="choose-course"></select>
    </div>
    <div class="flex-empty"></div>
    <button id="choose-btn" type="button" class="btn btn-primary margin-t2 width-full">选择</button>
</form>

<form id="create" style="display: none" class="flex-col justify-start align-start flex-grow width-full-6 margin-l3 margin-r3">
    <div class="width-full form-group margin-b3">
        <label for="create-name">题库名称</label>
        <input type="text" class="form-control" id="create-name" placeholder="">
    </div>
    <div class="width-full form-group margin-b3">
        <label for="create-description">题库描述</label>
        <input type="text" class="form-control" id="create-description" placeholder="">
    </div>
    <div class="flex-empty"></div>
    <button id="create-btn" type="button" class="btn btn-primary margin-t2 width-full">创建</button>
</form>
<form id="update" style="display: none" class="flex-col justify-start align-start flex-grow width-full-6 margin-l3 margin-r3">
    <div class="width-full form-group margin-b3">
        <label for="update-bank">选择题库</label>
        <select class="form-control text-primary" id="update-bank"></select>
    </div>
    <div class="width-full form-group margin-b3">
        <label for="update-name">新题库名称</label>
        <input type="text" class="form-control" id="update-name" placeholder="">
    </div>
    <div class="width-full form-group margin-b3">
        <label for="update-description">新题库描述</label>
        <input type="text" class="form-control" id="update-description" placeholder="">
    </div>
    <div class="flex-empty"></div>
    <button id="update-btn" type="button" class="btn btn-primary margin-t2 width-full">更新</button>
</form>
<form id="set" style="display: none" class="flex-col justify-start align-start flex-grow width-full-6 margin-l3 margin-r3">
    <div class="width-full form-group margin-b3">
        <label for="set-bank">选择题库</label>
        <select class="form-control text-primary" id="set-bank"></select>
    </div>
    <div class="width-full form-group margin-b3">
        <label for="set-account">授权用户</label>
        <input type="number" class="form-control" id="set-account" placeholder="学工号：17114455">
    </div>
    <div class="width-full form-group margin-b3">
        <label for="set-accountVerify">确认授权用户</label>
        <input type="number" class="form-control" id="set-accountVerify" placeholder="学工号：17114455">
    </div>
    <div class="flex-empty"></div>
    <button id="set-btn" type="button" class="btn btn-primary margin-t2 width-full">设置</button>
</form>
<form id="unset" style="display: none" class="flex-col justify-start align-start flex-grow width-full-6 margin-l3 margin-r3">
    <div class="width-full form-group margin-b3">
        <div class="alert alert-warning">
            指定用户将失去题库管理权
        </div>
    </div>
    <div class="width-full form-group margin-b3">
        <label for="unset-bank">选择题库</label>
        <select class="form-control text-warning" id="unset-bank"></select>
    </div>
    <div class="width-full form-group margin-b3">
        <label for="unset-account">取消授权用户</label>
        <input type="number" class="form-control" id="unset-account" placeholder="学工号：17114455">
    </div>
    <div class="width-full form-group margin-b3">
        <label for="unset-accountVerify">确认取消授权用户</label>
        <input type="number" class="form-control" id="unset-accountVerify" placeholder="学工号：17114455">
    </div>
    <div class="flex-empty"></div>
    <button id="unset-btn" type="button" class="btn btn-warning margin-t2 width-full">移除</button>
</form>
<form id="delete" style="display: none" class="flex-col justify-start align-start flex-grow width-full-6 margin-l3 margin-r3">
    <div class="width-full form-group margin-b3">
        <div class="alert alert-danger">
            警告：题库即将被删除
        </div>
    </div>
    <div class="width-full form-group margin-b3">
        <label for="delete-bank">选择题库</label>
        <select class="form-control text-danger" id="delete-bank"></select>
    </div>
    <div class="width-full form-group margin-b3">
        <label for="delete-verifyBank">确认选择题库</label>
        <select class="form-control text-danger" id="delete-verifyBank"></select>
    </div>
    <div class="flex-empty"></div>
    <button id="delete-btn" type="button" class="btn btn-danger margin-t2 width-full">删除</button>
</form>

<form id="chooseB" style="display: none" class="flex-col justify-start align-start flex-grow width-full-6 margin-l3 margin-r3">
    <div class="width-full form-group margin-b3">
        <label for="chooseB-bank">选择题库</label>
        <select class="form-control text-primary" id="chooseB-bank"></select>
    </div>
    <div class="flex-empty"></div>
    <button id="chooseB-btn" type="button" class="btn btn-primary margin-t2 width-full">选择</button>
</form>
<form id="bank" style="display: none" class="flex-col justify-start align-start flex-grow width-full-6 margin-l3 margin-r3">
    <div class="width-full" style="max-height: 44rem; overflow: auto" id="questionList"></div>
    <div class="flex-empty"></div>
    <div class="flex flex-row">
        <button data-toggle="modal" data-target="#createSingleQuestionModal" type="button" class="btn btn-primary margin-r2">
            创建单选题目
        </button>
        <button data-toggle="modal" data-target="#createMultipleQuestionModal" type="button" class="btn btn-primary margin-r2">
            创建多选题目
        </button>
        <button data-toggle="modal" data-target="#createJudgeQuestionModal" type="button" class="btn btn-primary margin-r2">
            创建判断题目
        </button>
    </div>
</form>

<div class="modal" tabindex="-1" role="dialog" id="deleteQuestionModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">删除题目</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="alert alert-danger">警告即将删除题目</div>
                <input aria-label="" type="text"
                       class="form-control margin-b1" id="question-delete-uuid" placeholder="输入题目唯一ID">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button id="question-delete-btn-submit" type="button" class="btn btn-danger">删除</button>
            </div>
        </div>
    </div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="createSingleQuestionModal">
    <div class="width-full height-full padding-2" role="document">
        <div class="modal-content width-full height-full">
            <div class="modal-header">
                <h5 class="modal-title">创建单选题</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <textarea aria-label="" class="form-control margin-b1" id="questionS-create-question" placeholder="输入题目"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionS-create-analysis" placeholder="输入题目解析"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionS-create-a" placeholder="输入答案A"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionS-create-b" placeholder="输入答案B"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionS-create-c" placeholder="输入答案C"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionS-create-d" placeholder="输入答案D"></textarea>
                <label for="questionS-create-answer">选择答案</label>
                <select class="form-control text-primary" id="questionS-create-answer">
                    <option value="A">A</option>
                    <option value="B">B</option>
                    <option value="C">C</option>
                    <option value="D">D</option>
                </select>
                <label for="questionS-create-level">选择难度</label>
                <select class="form-control text-primary" id="questionS-create-level">
                    <option value="Basic">简单</option>
                    <option value="Normal">正常</option>
                    <option value="Difficult">困难</option>
                    <option value="Challenging">挑战</option>
                </select>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button id="questionS-create-btn-submit" type="button" class="btn btn-primary">提交</button>
            </div>
        </div>
    </div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="createMultipleQuestionModal">
    <div class="width-full height-full padding-2" role="document">
        <div class="modal-content width-full height-full">
            <div class="modal-header">
                <h5 class="modal-title">创建多选题</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <textarea aria-label="" class="form-control margin-b1" id="questionM-create-question" placeholder="输入题目"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionM-create-analysis" placeholder="输入题目解析"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionM-create-a" placeholder="输入答案A"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionM-create-b" placeholder="输入答案B"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionM-create-c" placeholder="输入答案C"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionM-create-d" placeholder="输入答案D"></textarea>
                <label for="questionM-create-answer">选择答案（按住 Ctrl 单击进行多选）</label>
                <select multiple class="form-control text-primary" id="questionM-create-answer">
                    <option value="A">A</option>
                    <option value="B">B</option>
                    <option value="C">C</option>
                    <option value="D">D</option>
                </select>
                <label for="questionM-create-level">选择难度</label>
                <select class="form-control text-primary" id="questionM-create-level">
                    <option value="Basic">简单</option>
                    <option value="Normal">正常</option>
                    <option value="Difficult">困难</option>
                    <option value="Challenging">挑战</option>
                </select>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button id="questionM-create-btn-submit" type="button" class="btn btn-primary">提交</button>
            </div>
        </div>
    </div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="createJudgeQuestionModal">
    <div class="width-full height-full padding-2" role="document">
        <div class="modal-content width-full height-full">
            <div class="modal-header">
                <h5 class="modal-title">创建判断题</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <textarea aria-label="" class="form-control margin-b1" id="questionJ-create-question" placeholder="输入题目"></textarea>
                <textarea aria-label="" class="form-control margin-b1" id="questionJ-create-analysis" placeholder="输入题目解析"></textarea>
                <label for="questionJ-create-answer">选择答案</label>
                <select class="form-control text-primary" id="questionJ-create-answer">
                    <option value="1">对</option>
                    <option value="0">错</option>
                </select>
                <label for="questionJ-create-level">选择难度</label>
                <select class="form-control text-primary" id="questionJ-create-level">
                    <option value="Basic">简单</option>
                    <option value="Normal">正常</option>
                    <option value="Difficult">困难</option>
                    <option value="Challenging">挑战</option>
                </select>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button id="questionJ-create-btn-submit" type="button" class="btn btn-primary">提交</button>
            </div>
        </div>
    </div>
</div>

</body>
</html>
